package com.puzzletest.bean;

import org.json.JSONObject;

public class ImageInfo {

	private int id;
	private String name;
	private String scale;
	private String rotation;
	private String rotationpoint;
	private String pointarray;
	private int templateid;

	public ImageInfo() {
	}

	public ImageInfo(JSONObject jsonObject) {
		fromJson(jsonObject);
	}

	private void fromJson(JSONObject jsonObject) {
		if (jsonObject == null || jsonObject.equals("")) {
			return;
		}

		try {
			
			setId(jsonObject.getInt("id"));
			setName(jsonObject.getString("name"));
			setScale(jsonObject.getString("scale"));
			setRotation(jsonObject.getString("rotation"));
			setRotationpoint(jsonObject.getString("rotationpoint"));
			setPointarray(jsonObject.getString("pointarray"));
			setTemplateid(jsonObject.getInt("templateid"));
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getScale() {
		return scale;
	}

	public void setScale(String scale) {
		this.scale = scale;
	}

	public String getRotation() {
		return rotation;
	}

	public void setRotation(String rotation) {
		this.rotation = rotation;
	}

	public String getRotationpoint() {
		return rotationpoint;
	}

	public void setRotationpoint(String rotationpoint) {
		this.rotationpoint = rotationpoint;
	}

	public String getPointarray() {
		return pointarray;
	}

	public void setPointarray(String pointarray) {
		this.pointarray = pointarray;
	}

	public int getTemplateid() {
		return templateid;
	}

	public void setTemplateid(int templateid) {
		this.templateid = templateid;
	}

}
